class Wine
	 def initialize()
		@log = Logger.new(STDOUT)
		@producer = ""
		@source = "n/a"
		@country = ""
		@region = ""
		@area = ""
		@year = 0
		@ean = ""
		@category = ""
		@type = ""
		@alcohol = ""
		@name = "Unknown wine"
	end
	
	# Who made the wine
	attr_accessor :producer
	
	# Where was this information found
	attr_accessor :source
	
	# When was the wine made
	attr_accessor :year
	
	#Where does the wine come from
	attr_accessor :country, :region, :area
	
	attr_accessor :ean, :category, :type, :alcohol, :name
	
	def to_s
		"Wine Description for \"" + @name +  	"\"\n"+
		"\t- Producer: " + @producer + "\n" +
		"\t- Source:   " + @source + "\n" +
		"\t- Country:  " + @country + "\n" +
		"\t- Region:   " + @region + "\n" +
		"\t- Area:     " + @area + "\n" +
		"\t- Category: " + @category + "\n" +
		"\t- Type:     " + @type + "\n" +
		"\t- Alcohol:  " + @alcohol + "\n" +
		"\t- Year:     " + @year.to_s + "\n" + 
		"\t- EAN:      " + @ean
	
	end
	
	# Quick hack, but a hash goes easy to a cvs. Maybe convert everything to a hash?
	def to_hash
	  w = Hash["Producer" => @producer,
              "Source" => @source, 
              "Country  "  => @country, 
              "Region"  => @region, 
              "Area"  => @area, 
              "Category"  => @category,
              "Type"  => @type, 
              "Alcohol"  => @alcohol, 
              "Year"  => @year.to_s,  
              "EAN"  => @ean]
	end
end